﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
namespace Miao.UI
{
    public abstract class LayeroutPanel : UIMotionPanel
    {
        public GameObject childPanelPrefab;
        public RectTransform group;//从这个的子类获取
        [HideInInspector]
        public int usePanelCount;
        /// <summary>
        /// 添加对应的按键回调通过这个函数
        /// </summary>
        /// <param name="number"></param>
        /// <param name="call"></param>
        public void AddChildButtonCall(int number,UnityAction call)
        {
            Button button = group.GetChild(number).GetComponent<Button>();
            button.onClick.AddListener(call);
        }
    }
}
